package com.moli.iov.base.enums;

/**
 * <p>
 * 异常登录 处理状态
 * </p>
 *
 * @author zql
 * @since 2020/2/20 15:26
 */
public enum UnauthStatusEnum {

  /**
   * 未处理
   */
  UNPROCESSED(1, "未处理"),

  /**
   * 已处理
   */
  PROCESSED(2, "已处理");

  private int flag;

  private String msg;

  UnauthStatusEnum(int flag, String msg) {
    this.flag = flag;
    this.msg = msg;
  }

  public static String getMsg(Integer flag){

    if(flag == null){
      return "";
    }

    for(UnauthStatusEnum e : UnauthStatusEnum.values()){
      if(e.flag == flag){
        return e.getMsg();
      }
    }
    return "";
  }

  public int getFlag() {
    return flag;
  }

  public String getMsg() {
    return msg;
  }
}
